<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="org.limp.mine.DateTrimmer"%>
<%@include file="./../hys_head.jsp"%>

<%
	String context = jt.classic.system.ISystem.getContextPath();
	Object[] result = (Object[]) request.getAttribute("result");
	Label label = (Label) result[1];
	Controller controller = (Controller) result[2];
	String pageNO = (String) result[3];
	List resultList = (List) result[0];

	String tp = (String) request.getAttribute("tp");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>会议室预定审批列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<jsp:include page="../../head.jsp"></jsp:include>
<script language="javascript">
       //会议室申请查看
  function handleView(id){
      var url = "<%=context%>/app/hysyd.do?method=view&id=" + id;
      top.xwin(this,url,true,"",900,550);
  }
/**
转向--会议室预定审批页面
*/
function shenpi(hysyd_id){
	window.location.href = "hysyd.do?method=hysyd_sp&id=" + hysyd_id;
}

  var chk = false;
  function checkall(thizz){
    var chks = document.getElementsByTagName("input");
    for(var i=0;i<chks.length;i++){
      if(chks[i].type == "checkbox"){
        chks[i].checked = !chk;
      }
    }
    
    chk = !chk;
  }
  
  function handleDelete(){
    var rnt = false;
    var ids = "";
    var chks = document.getElementsByTagName("input");
    for(var i=0;i<chks.length;i++){
      if(chks[i].type == "checkbox" && chks[i].checked){
        rnt = true;
        ids += chks[i].value + ",";
      }
    }
    
    if(!rnt){
      alert("请选择要删除模块");
    }else if(confirm("确定删除模块")){
      createHidden("ids",ids.substring(0,ids.length - 1));
      document.form1.action = "<%=context%>/system/module.do?method=delete";
      document.form1.submit();
    }
  }
  
  function handleQuery(){
     document.form1.action = "<%=context%>/app/hysyd.do?method=list_sp";
     document.form1.submit();
  }
  
  function query(){
    document.form1.action = context + "/system/user.do?method=list";
    document.form1.submit();
  }
  
  function handleInsert(){
      var url = "<%=context%>/app/hysyd.do?method=neu";
      window.location.href = url;
  }
  
  function handleEdit(id){
      var url = "<%=context%>/system/module.do?method=edit&id=" + id;
      top.dialog(url,true,"编辑模块信息",700,500);
  }
  
  function handleReresh(){
      window.location.href = context + "/app/hysyd.do?method=list_sp&pageNO=<%=pageNO%>";
  }
</script>
<body>
<form name="form1" method="post" action=""><input type="hidden"
	name="pageNO" value="<%=pageNO%>">
<select style="width:200px;" name="tp">
			<option value="0" <%="0".equals(tp)?"selected":""%>>待审核</option>
			<option value="1" <%="1".equals(tp)?"selected":""%>>审核通过</option>
			<option value="2" <%="2".equals(tp)?"selected":""%>>审核未通过</option>
		</select> 
		<img src="/app/info/images/search.png" style="cursor:hand;margin-bottom:-4px;" onclick="javascript:handleQuery();"/>查 询
<table class="tbl" align="center" width="98%">
    <thead>
	<tr>
		<td class="td1">&nbsp;会议编号</td>
		<td class="td1">&nbsp;会议主题</td>
		<td class="td1">&nbsp;地点（会议室）</td>
		<td class="td1">&nbsp;申请人</td>
		<td class="td1">&nbsp;开始时间</td>
		<td class="td1">&nbsp;审批意见</td>
		<td class="td1">&nbsp;处理状态</td>
	</tr>
	</thead>
	<%
			if (resultList != null && !resultList.isEmpty()) {

			for (int i = 0; i < resultList.size(); i++) {
				Map info = (Map) resultList.get(i);
				String number = (String) info.get("PAGINATION_NUMBER");
				String HYSYD_ID = info.get("HYSYD_ID").toString();

				String HYSYD_HYBH = info.get("HYSYD_HYBH").toString();
				String HYSYD_ZT = info.get("HYSYD_ZT").toString();

				String HYSYD_HYSID = info.get("HYSYD_HYSID").toString();
				String HYS_MC = info.get("HYS_MC").toString();

				String CREATE_USER = info.get("CREATE_USER").toString();
				String NAME = info.get("NAME").toString();

				String HYSYD_KSSJ = info.get("HYSYD_KSSJ").toString();
				String HYSYD_SPYJ = info.get("HYSYD_SPYJ").toString();
				String HYSYD_SPZT = info.get("HYSYD_SPZT").toString();
	%>
	<tr>
		<td>&nbsp;<%=HYSYD_HYBH%></td>
		<td>&nbsp;<a
			href="javascript:void(0);" onclick="javascript:handleView('<%=HYSYD_ID%>');"><%=HYSYD_ZT%></a></td>
		<td>&nbsp;<%=HYS_MC%></td>
		<td>&nbsp;<%=NAME%></td>
		<td>&nbsp;<%=DateUtilMy.getNYR_H_M_S(HYSYD_KSSJ)%></td>
		<td>&nbsp;<%=HYSYD_SPYJ%></td>
		<td>&nbsp;<%=Hys_Code.getSPZT_HTML(HYSYD_SPZT, HYSYD_ID)%></td>

	</tr>
	<%
		}
		}
	%>
</table>
<table width="98%" class="tab-noborder" align="center">
	<tr>
		<td><%=label.displayLabel()%></td>
		<td align="right"><%=label.startLabel()%> <%=label.previousLabel()%>
		<%=label.nextLabel()%> <%=label.endLabel()%> <%=controller.getController().toString()%>
		</td>
	</tr>
</table>
<%=controller.getControlScript(true)%></form>
</body>
</html>
